package com.msw.jcwapi.wb.wbdz.service.impl;

import com.msw.jcwapi.wb.wbdz.entity.Wbdz;
import com.msw.jcwapi.wb.wbdz.mapper.WbdzMapper;
import com.msw.jcwapi.wb.wbdz.service.IWbdzService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-04-01
 */
@Service
public class WbdzServiceImpl extends ServiceImpl<WbdzMapper, Wbdz> implements IWbdzService {

    @Autowired
    private WbdzMapper wbdzMapper;

    //通过工程id查询全部底座
    @Override
    public List<Wbdz> listByProId(int id) {
        return wbdzMapper.listByProId(id);
    }

    //通过wbdzid删除该底座的信息
    @Override
    public boolean deleteById(int id) {
        return wbdzMapper.deleteById(id);
    }

    //通过wbdzid查询该底座的全部信息
    @Override
    public Wbdz listByWbdzId(int id) {
        return wbdzMapper.listByWbdzId(id);
    }

    //编辑腕臂底座(通过id编辑)
    @Override
    public boolean update(Wbdz wbdz) {
        return wbdzMapper.Edit(wbdz);
    }

    //添加腕臂底座
    @Override
    public boolean add(Wbdz wbdz) {
        return wbdzMapper.add(wbdz);
    }


}
